package vn.allmobile.newsreader;

import java.util.ArrayList;
import java.util.List;

import vn.allmobile.newsreader.adapters.NewsFlipAdapter;
import vn.allmobile.newsreader.adapters.NewsItem;
import vn.allmobile.newsreader.data.Category;
import android.app.Activity;
import android.os.Bundle;
import android.widget.ListView;

import com.aphidmobile.flip.FlipViewController;

public class NewsActivity extends Activity {

	String mSourceID;
	String mCategoryID;
	ListView mGrid;
	Category mCategory;
	protected FlipViewController flipView;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		// TODO Auto-generated method stub
		super.onCreate(savedInstanceState);
		flipView = new FlipViewController(this, FlipViewController.HORIZONTAL);

		List<NewsItem> list = new ArrayList<NewsItem>();
		for (int i = 1; i < 30; i++) {
			NewsItem item = new NewsItem(String.valueOf(i), "", "", "", "");
			list.add(item);
		}
		flipView.setAdapter(new NewsFlipAdapter(this, getApplicationContext(),
				list));
		setContentView(flipView);
	}

	@Override
	public void onWindowFocusChanged(boolean hasFocus) {
		super.onWindowFocusChanged(hasFocus);

	}

}
